The present invention relates to a data processing device comprising a function for a plurality of central processing units (CPU) to communicate with an external USB (Universal Serial Bus) device using one physical communication path and, to technology which is effective when applied to, for example, a semiconductor data processing device for mobile communication.
A USB interface module to be interfaced with a USB device has a plurality of pipes (PIPE) including a FIFO (First-in First-out) buffer etc. and controls communication with a specific end point by specifying a device address and an end point of the USB device for each pipe. A transaction transmitted/received between a pipe and an end point is managed by a USB protocol engine within a USB module. A transaction includes a token packet including a device address, an end point, etc., a data packet including data to be transmitted/received, a handshake packet to return information about success or failure of communication, etc. The USB protocol engine communicates with the USB device by transmitting/receiving each packet to/from the USB device and writes/reads transmission/reception data to each pipe. When there are requests for communication from the pipes, the USB protocol engine switches the pipes for each transaction to avoid the occupation of the communication path by one pipe.
Patent Document 1 (Japanese Patent Laid-Open No. 2001-256173) describes the invention that allows a plurality of CPUs to use one USB device in a time-division manner. That is, any one of the CPUs that selectively use the USB device serves as a main host, which is substantially a host of a system, and the other CPUs each serve as a sub host, and the main host temporarily receives data to be transmitted to the USB device from each sub host and transfers the data to the corresponding USB device, and temporarily receives data to be transmitted to the corresponding sub host from the USB device and transfers the data to the corresponding sub host, and thus, the USB device is controlled so as to be used exclusively by each sub host. Due to this, a plurality of hosts seems to exist in one system, however, one of the hosts serves as a main host and the USB device is controlled so as to be used exclusively by the other sub hosts, and thereby, a sub host is recognized as one USB device by the main host. Hence, it is made possible for the hosts to use one USB device in a time-division manner and there is no need of each host switching a device to a hub of a system to which the host belongs, and thus, convenience can be improved.